<?php

namespace App\models\user;

use Illuminate\Database\Eloquent\Model;

/**
 * App\models\user\UserRoles
 *
 * @property int $id
 * @property int $uid
 * @property int $role_id
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property-read \App\models\user\Roles $role
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\UserRoles whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\UserRoles whereUid($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\UserRoles whereRoleId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\UserRoles whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\UserRoles whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class UserRoles extends Model
{
    public function role(){
        return $this->belongsTo(Roles::class, 'role_id', 'id');
    }
}
